﻿#ifndef USERDATA_H
#define USERDATA_H

#include<QString>
class UserData
{
public:
    UserData(){}
    UserData(QString name,int age)
    {
        m_Name=name;
        m_Age=age;
    }
    void setName(QString name)
    {
        m_Name=name;
    }
    QString getName()
    {
        return m_Name;
    }
    void setAge(int age)
    {
        m_Age=age;
    }
    int getAge()
    {
        return m_Age;
    }
    void setAddress(QString address);
    QString getAddress()const;
    void setIDNum(QString id);
    QString getIDNum()const;
    void setPhoneNum(int pnum);
    int getPhoneNum()const;
    static UserData&instance()
    {
        static UserData instance;
        return instance;
    }
private:
    QString m_Name;
    QString m_Address;
    QString m_IDNum;//身份证末尾可能为字母
    int m_Age;
    int m_PhoneNum;
};

#endif // USERDATA_H
